package com.platform.usercenter.service.impl;

import java.util.List;
import com.platform.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.platform.usercenter.mapper.SysUserGuestMapper;
import com.platform.usercenter.domain.SysUserGuest;
import com.platform.usercenter.service.ISysUserGuestService;

/**
 * 游客用户信息Service业务层处理
 *
 * @author platform
 * @date 2024-12-31
 */
@Service
public class SysUserGuestServiceImpl implements ISysUserGuestService
{
    @Autowired
    private SysUserGuestMapper sysUserGuestMapper;

    /**
     * 查询游客用户信息
     *
     * @param userId 游客用户信息主键
     * @return 游客用户信息
     */
    @Override
    public SysUserGuest selectSysUserGuestByUserId(Long userId)
    {
        return sysUserGuestMapper.selectSysUserGuestByUserId(userId);
    }

    /**
     * 查询游客用户信息列表
     *
     * @param sysUserGuest 游客用户信息
     * @return 游客用户信息
     */
    @Override
    public List<SysUserGuest> selectSysUserGuestList(SysUserGuest sysUserGuest)
    {
        return sysUserGuestMapper.selectSysUserGuestList(sysUserGuest);
    }

    /**
     * 新增游客用户信息
     *
     * @param sysUserGuest 游客用户信息
     * @return 结果
     */
    @Override
    public int insertSysUserGuest(SysUserGuest sysUserGuest)
    {
        sysUserGuest.setCreateTime(DateUtils.getNowDate());
        return sysUserGuestMapper.insertSysUserGuest(sysUserGuest);
    }
    /**
     * 新增游客用户信息
     *
     * @param sysUserGuest 游客用户信息
     * @return 结果
     */
    @Override
    public int insertSysUserGuestFc(SysUserGuest sysUserGuest)
    {
        sysUserGuest.setCreateTime(DateUtils.getNowDate());
        return sysUserGuestMapper.insertSysUserGuestFc(sysUserGuest);
    }

    /**
     * 修改游客用户信息
     *
     * @param sysUserGuest 游客用户信息
     * @return 结果
     */
    @Override
    public int updateSysUserGuest(SysUserGuest sysUserGuest)
    {
        sysUserGuest.setUpdateTime(DateUtils.getNowDate());
        return sysUserGuestMapper.updateSysUserGuest(sysUserGuest);
    }

    /**
     * 批量删除游客用户信息
     *
     * @param userIds 需要删除的游客用户信息主键
     * @return 结果
     */
    @Override
    public int deleteSysUserGuestByUserIds(Long[] userIds)
    {
        return sysUserGuestMapper.deleteSysUserGuestByUserIds(userIds);
    }

    /**
     * 删除游客用户信息信息
     *
     * @param userId 游客用户信息主键
     * @return 结果
     */
    @Override
    public int deleteSysUserGuestByUserId(Long userId)
    {
        return sysUserGuestMapper.deleteSysUserGuestByUserId(userId);
    }
}
